﻿using System.Data;

namespace Smatime.Web.Models
{
    public class CompanyUser : BaseEntity
    {
        public long CompanyId { get; set; }
        public long UserAccessId { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
        public string Password { get; set; }
        public long[] StoreIds { get; set; }
        public override BaseEntity FromDataRow(DataRow row)
        {
            Id = (long) row["Id"];
            CompanyId = (long) row["CompanyId"];
            UserAccessId = (long) row["UserAccessId"];
            Name = row["Name"].ToString();

            return base.FromDataRow(row);
        }

        public override void ToDataRow(DataRow row)
        {
            row["CompanyId"] = CompanyId;
            row["UserAccessId"] = UserAccessId;
            row["Name"] = Name;
            row["RowStatus"] = RowStatus;
            base.ToDataRow(row);
        }
    }
}